package com.baize.cpdepus.service.lmp;

import com.baize.cpdepus.entity.Category;
import com.baize.cpdepus.mapper.CategoryMapper;
import com.baize.cpdepus.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public void add(Category category) {
        categoryMapper.InsertOne(category);
    }

    @Override
    public void remove(Integer ID) {
        categoryMapper.Delete(ID);
    }

    @Override
    public List<Category> SelectAll() {
        return categoryMapper.SelectAll();
    }
}
